package com.mxx.tomcat;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * @Auther: Mr. Zeng
 * @Date: 2021/4/8 20:13
 * @Description: 暂无描述
 */
@Configuration
public class WebExceptionResolverConfigurer implements WebMvcConfigurer {
    @Autowired
    private ResponseWriter responseWriter;

    @Override
    public void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> resolvers) {
        resolvers.add(new WebExceptionResolver(responseWriter));
    }
}
